﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            listBox1.Items.Add("公鸡      母鸡      小鸡");
        }

        private void button2_Click(object sender, EventArgs e)
        {
      
        }

        private void button1_Click(object sender, EventArgs e)
        {
            double x, y, z;
            for (x = 0; x <= 100; x++)
            {
                for (y = 0; y <= 100; y++)
                {
                    z = 100 - x - y;
                    if (5 * x + 3 * y + z / 3 == 100)
                    {
                        listBox1.Items.Add(x + "          " + y + "          " + z);
                    }
                }
            }
        }
    }
}
